package com.coderyeah.cosmetology.controller;


import com.coderyeah.cosmetology.entity.Business;
import com.coderyeah.cosmetology.service.BusinessService;
import com.coderyeah.cosmetology.util.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author lqs
 * @since 2022-05-24
 */
@RestController
@RequestMapping("/business")
public class BusinessController {
    @Resource
    private BusinessService businessService;

    @GetMapping
    public Business queryById(@RequestParam("id") Long id) {
        return businessService.getById(id);
    }

    @GetMapping("getBusInfoByProId")
    public Result getBusInfoByProId(String id) {
        return businessService.getBusInfoByProId(id);
    }
}

